package com.by.config;

import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ServivE
 * @version 0.1
 * @className FeignConfig
 * @description
 * @date 2024/11/16 14:19
 * @since jdk17
 */
@Configuration
public class FeignConfig {

    @Value("${auth.key}")
    String key;
    @Value("${auth.secret}")
    String secret;

    @Bean
    public BasicAuthRequestInterceptor requestInterceptor() {
        return new BasicAuthRequestInterceptor(key, secret);
    }

}
